<style type="text/css">
pre {
  border: 1px dashed #333333;
  padding: 10px;
  height: 80%;
  width:80%;
  overflow:scroll;

}
</style>

<script src="./static/comet.js" type="text/javascript"></script>
    <script type="text/javascript" charset="utf-8">
    document.domain = extract_xss_domain(document.domain);
    </script>

<h3>Real-time referers log:</h3>
<pre id='p' >
</pre>

<script>
var p = document.getElementById('p');
function user_callback(data){
    if(!data || data=='ping')
        return;
    try{
        if(data.substr(0,3) == '#1 ')
            p.innerHTML = '';
    }catch(e){};

    var i = p.innerHTML;
    p.innerHTML = i + '<br>'+data;
    p.scrollTop = p.scrollHeight;
}

//var cross_domain_domain = 'comet.' + ('' + document.location).split('/')[2];
//close_comet_function = comet_crossdomain_connection('http://'+cross_domain_domain+'/static/crosscomet.html', '/comet.html', user_callback);

close_comet_function = comet_connection('/comet.html', user_callback);

</script>
